package com.lanou.goods.controller;

import com.lanou.beans.Member;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;


@RestController
public class GoodsController {

    @RequestMapping("/test")
    public String foo(HttpSession session){
        Member m = (Member) session.getAttribute("user");
        return m.getUsername();
    }
}
